import React, { Component } from 'react';
import { Button, WhiteSpace } from "antd-mobile";
import history from "../../util/router/history";

interface IErrorProps{
  tips?: string;
}

export default class ErrorPage extends Component<IErrorProps, any> {
  static defaultProps = {
    tips: "啊哦，页面不见了...",
  };

  render() {
    return (
      <div className="list-none">
        <img src={require('./img/none.png')} width="200px" height="200px" alt='none'/>
        <p>{this.props.tips}</p>
        <WhiteSpace/>
        <Button
          type="ghost"
          size="small"
          inline
          onClick={() => history.replace('/')}
        >
          去首页
        </Button>
      </div>
    );
  }
}
